package com.matrix.cola.cloud.auth.utils;

/**
 * 鉴权服务常量
 *
 * @author : cui_feng
 * @since : 2022-09-16 10:51
 */
public interface AuthConstant {

    /**
     * system_client表字段
     */
    String CLIENT_FIELDS = "client_id, CONCAT('{noop}',client_secret) as client_secret, resource_ids, scope, " +
            "authorized_grant_types, " +
            "web_server_redirect_uri, authorities, access_token_validity, " +
            "refresh_token_validity, additional_information, autoapprove";

    /**
     * system_client查询语句
     */
    String BASE_STATEMENT = "select " + CLIENT_FIELDS + " from system_client";

    /**
     * 排序
     */
    String DEFAULT_FIND_STATEMENT = BASE_STATEMENT + " order by client_id";

    /**
     * 查询客户端
     */
    String DEFAULT_SELECT_STATEMENT = BASE_STATEMENT + " where client_id = ?";
}
